using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BlackBird : Bird
{
    //爆炸半径
    public float boomRadius = 2.5f;

    protected override void FullTimeSkill()
    {
        //以某个圆点为中心，爆炸半径为半径，爆炸
        Collider2D[] collider2Ds = Physics2D.OverlapCircleAll(transform.position, boomRadius);
        foreach (Collider2D collider2D in collider2Ds)
        {
            //是否有Destructiable脚本
            Destructiable des = collider2D.GetComponent<Destructiable>();
            if (des != null)
            {
                des.TakeDamage(Int32.MaxValue);//爆炸,伤害无穷大
            }
        }
        state = BirdState.WaitToDie;//状态转为等待死亡
        LoadNextBird();
    }
}
